home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Examples / graphsInSpace / grid3.wwModel / model.eve < prev   
Encoding:
Text File  |  1995-04-23  |  3.3 KB  |  86 lines

  1.  
  2. #we want a patch where positive X is ascending time, and have 
  3.  
  4. set length 10
  5. set height 2.56
  6. set depth 3.84
  7. set text(color) "1 1 1"
  8. set text(fontName) Helvetica
  9. set text(size) 18
  10. set dataSlice(yRotate) 180
  11. set dataSlice(zRotate) 270
  12. set time 0
  13. set duration [expr {1./60}]
  14.  
  15. animatable: {set dataSlice(origin) [expr {-1 * $time}]}
  16. animatable: {set dataSlice(xTranslate) [expr {-1 * $height}]}
  17. set dataSlice(yTranslate) 0
  18. animatable: {set dataSlice(zTranslate) [expr {-1 * $depth}]}
  19.  
  20. loadControlPanel controls.nib
  21.  
  22. startShape gridWorld
  23.   startShape  floor
  24.     MakeTexture $modelPath/grid.tiff /tmp/grid.tx clamp clamp box 2 2 
  25.     Surface paintedplastic texturename /tmp/grid.tx
  26.     animatable: {Patch bilinear P "0 0 0  \
  27.                               0 0 $depth \
  28.                               $length 0 0 \
  29.                               $length 0 $depth"}
  30.     startShape ticks
  31.       Surface constant
  32.       for {set i 0} {$i <= $length} {incr i} \
  33.       {  startShape tick.${i}
  34.            Translate $i 0 0; 
  35.            Color $text(color)
  36.            WW3DText $text(fontName) $text(size) $i;
  37.          endShape
  38.       }
  39.     endShape
  40.   endShape
  41.   startShape dataSlice
  42.     Declare mapname string
  43.     MakeTexture $modelPath/dataSlice.tiff /tmp/dataSlice.tx clamp clamp box 2 2 
  44.     # I'm putting this in an animatable: so that it doesn't get applied directly to 
  45.     # the shape.  I could also flip the bit in the parser by 
  46.     # doing a "applyShadersDirectlyToCurrentShape 0"...
  47.     animatable: {Surface WWAlphaPaintedPlastic mapname /tmp/dataSlice.tx}
  48.     Color $text(color)
  49.     TransformBegin
  50.       animatable: {Rotate $dataSlice(yRotate) 0 1 0}
  51.       animatable: {Rotate $dataSlice(zRotate) 0 0 1}
  52.       animatable: {Translate $dataSlice(xTranslate) $dataSlice(yTranslate) $dataSlice(zTranslate)}
  53.       animatable: {Translate 0 $dataSlice(origin) 0 }
  54.       animatable: {Patch bilinear P "0 0 0  \
  55.                                 0 0 $depth \
  56.                                 $height 0 0 \
  57.                                 $height 0 $depth"}
  58.       animatable: {Translate 0 [expr {-1 * $duration}] 0}
  59.       # note that we've already made this texture above...
  60.       # I'm putting this in an animatable: so that it doesn't get applied directly to 
  61.       # the shape.  I could also flip the bit in the parser by 
  62.       # doing a "applyShadersDirectlyToCurrentShape 0"...
  63.       animatable: {Surface paintedplastic texturename /tmp/grid.tx}
  64.       animatable: {Patch bilinear P "0 0 0  \
  65.                                 0 0 $depth \
  66.                                 $height 0 0 \
  67.                                 $height 0 $depth"}
  68.     TransformEnd
  69.     Color .7 .7 .7
  70.     animatable: {Surface screen}
  71.     animatable: {Translate $time 0 0}
  72.     animatable: {Patch bilinear P "0 0 0  \
  73.                               0 $height 0 \
  74.                               $duration 0 0 \
  75.                               $duration $height 0"}
  76.     animatable: {Patch bilinear P "0 $height 0  \
  77.                               0 $height $depth \
  78.                               $duration $height 0 \
  79.                               $duration $height $depth"}
  80.     animatable: {Patch bilinear P "0 0 $depth  \
  81.                               0 $height $depth \
  82.                               $duration 0 $depth \
  83.                               $duration $height $depth"}
  84.   endShape
  85. endShape
  86.